const { ref, onMounted } = Vue

export function usePageHeightSet() {
  const clientHeight = ref(window.innerHeight - 364);// 【我的任务】区域高度
  const inputHeight = ref(clientHeight.value - 93);// 报工区域总高度
  const tableHeight = ref(clientHeight.value - 156);// 【子批次号】 表格高度

  onMounted(() => {
    window.addEventListener('resize', () => {
      clientHeight.value = window.innerHeight - 364;
      inputHeight.value = clientHeight.value - 95;
      tableHeight.value = clientHeight.value - 156;
    });
  });

  return { clientHeight, inputHeight, tableHeight }
}